How to repair broken keys in a keyboard cost-free on Linux

 

Problem

If you have some keys not working on your keyboard, normally you would buy a new one, which may may cost between 50 or 100 dollars, but there's a very simple solution that you can do to use your keyboard again without replacing it and it's an entirely cost-free solution!

In my example, I have a laptop with all the QWERTYUIOP row that wasn't working, requiring Tun (the owner of the laptop) to use a virtual keyboard every time those keys were needed. A really painful and slow solution!

Solution

The solution was simple: Using the central row as the replacement of the first (not-working) one by pressing a modifier key. This key was chosen to be ; which is easily accessible from all positions.

In short, if she presses A, the key A is printed, but if she presses ";" and then "A", the key "Q" is printed, perfect!

So first, edit your ~/.Xmodmap

scite ~/.Xmodmap

And then paste a similar code as this:

Note: You need to use your own keys configuration, so modify this to your needs!

Procedure tips:

setxkbmap us ; xmodmap ~/.Xmodmap

Autostart

E16 probably won't load this file by itself, in which case you can simply add it to the autostart applications with this simple command:

echo " xmodmap ~/.Xmodmap" >> ~/.e16/startup-applications.list

Done!